﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ParkingLot.Entitys.BaseOperateEx
{
    public class CompareBool
    {
        public bool Value;

        public CompareBool(bool value)
        {
            Value = value;
        }

        public static implicit operator CompareBool(bool value)
        {
            return new CompareBool(value);
        }

        public static Boolean operator >(CompareBool t1, CompareBool t2)
        {
            if (t1.Value)
            {
                if (!t2.Value)
                {
                    return true;
                }
            }
            return false;
        }

        public static Boolean operator <(CompareBool t1, CompareBool t2)
        {
            if (t2.Value)
            {
                if (!t2.Value)
                {
                    return true;
                }
            }

            return false;
        }

        public static Boolean operator ==(CompareBool t1, CompareBool t2)
        {
            if (t1.Value==t2.Value)
            {
                return true;
            }

            return false;
        }

        public static Boolean operator !=(CompareBool t1, CompareBool t2)
        {
            if (t1.Value == t2.Value)
            {
                return false;
            }

            return true;
        }
    }
}
